package edu.sctu.practice.class02.hujie.cgs.assign07.one;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.StringTokenizer;

/**
 * Created by hp on 2015/12/18.
 */
public class ChineseCharacters {
    public StringBuffer getChinesechasracters(File file) {
        StringBuffer hanzi = new StringBuffer();
        try {
            FileReader inOne = new FileReader(file);
            BufferedReader inTwo = new BufferedReader(inOne);
            String s = null;
            int i = 0;
            while ((s = inTwo.readLine()) != null) {
                StringTokenizer tokenizer = new StringTokenizer(s, ",'\n' ");
                while (tokenizer.hasMoreTokens()) {
                    hanzi.append(tokenizer.nextToken());
                }
            }
        } catch (Exception e) {
        }
        return hanzi;
    }
}
